package com.raja.servingStation.datasources;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.sql2o.Connection;
import org.sql2o.Query;

/**
 * 自定义的连接
 * Created by liuyanjun
 * on 2017/8/9/009.
 */
public class Sql2oConnection {
    private static final Logger log = LoggerFactory.getLogger(Sql2oConnection.class);

    /**
     * 创建query
     * @param sql
     * @return
     */
    public static Query createQuery(Connection con,String sql) throws Exception{
        log.debug(sql);
        Query query = con.createQuery(sql);
        return query;
    }
}
